functor IntMapTable (type key
		     val getInt: key -> int) : TABLE =
struct
  type key=key
  type 'a table = (key * 'a) IntBinaryMap.map
  val empty = IntBinaryMap.empty
  fun enter(t,k,a) = IntBinaryMap.insert(t,getInt k,(k,a))
  fun look(t,k) = case IntBinaryMap.find(t,getInt k) of
		      NONE => NONE
		    | SOME (k,v) => SOME v
  fun keys (t:'a table) = (map  (fn (k,v) => k) (IntBinaryMap.listItems t)) : key list
  fun items (t:'a table) = IntBinaryMap.listItems t
end
